//package com.es.disped.web.controller.usermenu;
//
//import java.util.ArrayList;
//import java.util.List;
//
//import org.springframework.http.HttpStatus;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//import com.es.disped.common.model.MsgModel;
//import com.es.disped.core.controller.BaseController;
//import com.es.disped.dao.model.Menu;
//import com.es.disped.dao.model.RolePermission;
//
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//
//@Api(value="用户菜单")
//@Controller
//@RequestMapping("/user/menu")
//public class UserMenuController extends BaseController {
//	
//	
//	@ApiOperation(value="获取登录用户菜单",response=MsgModel.class,httpMethod="POST",notes="获取登录用户菜单")
//	@RequestMapping(value="/init",method=RequestMethod.POST)
//	public @ResponseBody MsgModel init()
//	{
//		if(this.isNull(this.getSessionUser()))
//		{
//			return new MsgModel(HttpStatus.FORBIDDEN.value(), "用户已下线");
//		}
//		List<String> ids=new ArrayList<String>();
//		for(RolePermission rolePermission:this.getSessionUser().getUserRoles())
//		{
//			ids.add(rolePermission.getRoleId());
//		}
//		List<Menu> menus=this.getService().selectList("com.es.disped.dao.mapper.menu.MenuCustomMapper.getUserMenuMap", ids);
//		
//		return new MsgModel(menus.size()>0?HttpStatus.OK.value():HttpStatus.EXPECTATION_FAILED.value(),
//				menus.size()>0?"":"菜单加载失败",menus.size()>0?menus:"");
//	}
//}
